import request from "@/utils/request";

/**
 * @description 列表
 * @param params
 * @returns {*}
 */
export function list(params){
    return request({
        url:'/fw/admin/getHousingInformation',
        method:'GET',
        params
    })
}
/**
 * @description 基本信息新增/编辑
 * @param data
 * @returns {*}
 */
export function save(data){
    return request({
        url:'/fw/admin/saveOrUpdate',
        method:'POST',
        data
    })
}

/**
 * @description 删除
 * @param id
 * @returns {*}
 */
export function deleteRow(id){
    return request({
        url:'/fw/delete',
        method:'GET',
        params:{id}
    })
}

/**
 * @description 详情
 * @param id
 * @returns {*}
 */
export function detail(id){
    return request({
        url:'/fw/admin/adminGetFwInfoById',
        method:'GET',
        params:{id}
    })
}

/**
 * @description -获取房屋类型列表
 * @returns {*}
 */
export function getAdminGetFwlx(){
    return request({
        url:'/fwlx/adminGetFwlx',
        method:'GET'
    })
}
/**
 * @description -生成租赁证编号
 * @param houseType
 * @returns {*}
 */
export function generateLeaseCertificateNumberNewApi(houseType){
    return request({
        url:'/fw/admin/generateLeaseCertificateNumberNew',
        method:'GET',
        params:{houseType}
    })
}

/**
 * @description 获取房屋片区街道树形结构
 * @returns {*}
 */
export function getFwAreaStreetList(params){
    return request({
        url:'/fwAreaStreet/admin/getAreaStreetList',
        method:'GET',
        params
    })
}

/**
 * @description 房屋管理中获取房屋片区街道树形结构
 * @returns {*}
 */
export function getAreaStreetListDropDown(params){
    return request({
        url:'/fwAreaStreet/admin/getAreaStreetListDropDown',
        method:'GET',
        params
    })
}

/**
 * @description 获取房屋状态/结构
 * @returns {*}
 */
export function getFwState(params){
    return request({
        url:'/sysDic/queryDicByType',
        method:'GET',
        params
    })
}
/**
 * @description 获取房屋类区下拉列表
 * @returns {*}
 */
export function getFwlqList(){
    return request({
        url:'/fwlq/fwlqList',
        method:'GET'
    })
}
/**
 * @description 计算房屋租金
 * @returns {*}
 */
export function getHousingRentApi(params){
    return request({
        url:'/fw/admin/calculateHousingRent',
        method:'GET',
        params
    })
}

/**
 * @description 根据身份证号获取承租人关系记录
 * @returns {*}
 */
export function getTenantRelationshipByTenantIdCard(params){
    return request({
        url:'/tenantRelationship/admin/getTenantRelationshipByTenantIdCard',
        method:'GET',
        params
    })
}

/**
 * @description 保存房屋片区街道列表
 * @param data
 * @returns {*}
 */
export function saveAreaStreetList(data){
    return request({
        url:'/fwAreaStreet/admin/saveAreaStreetList',
        method:'POST',
        data
    })
}
/**
 * @description 片区街道详情
 * @returns {*}
 */
export function fwAreaStreetDetail(params){
    return request({
        url:'/fwAreaStreet/admin/getFwAreaStreetById',
        method:'GET',
        params
    })
}
/**
 * @description 片区街道详情
 * @returns {*}
 */
export function fwAreaStreetDelete(params){
    return request({
        url:'/fwAreaStreet/admin/deleteFwAreaStreetById',
        method:'GET',
        params
    })
}
